package com.vcc.service.service;

import com.mybatisflex.core.service.IService;
import com.vcc.data.entity.Permission;

import java.util.List;
import java.util.Set;

public interface PermissionService extends IService<Permission> {

    List<Permission> listAll();

    boolean existsByCode(String code);

    List<Permission> listByHasPersonal(Boolean hasPersonal);

    List<Permission> listByRoleId(Long roleId);

    List<Long> listIdParentId(Long parentId);

    Boolean removeByRoleId(Long roleId);

    Boolean updateHasPersonalById(Long id, Boolean hasPersonal);

    public Set<Long> getRelatedPermissionIds(Set<Long> permissionIds);

    public Set<Long> getRelatedPermissionIdsOptimized(Set<Long> permissionIds);
}
